<?php
	require("header.php");
?>
<?php
	//如果不是admin提示无法访问此网页
	if($userType !== "admin") { 
		header("location: accesserror.php");
	}
?>
<div id="content">
  <div id="content-header">
    <div id="breadcrumb"> <span><i class="icon-home"></i> 人员管理</span></div>
  </div>

  <div class="container-fluid">

    <div class="row-fluid">
      <div class="widget-box">
        <div class="widget-title bg_lg"><span class="icon"><i class="icon-th-list"></i></span>
          <h5>添加人员</h5>
        </div>
        <div class="center widget-content nopadding">
            <form class="form-horizontal" method="post" action="doaddpop.php">
              <?php
              	if(isset($_GET["result"])) { 
              		$result = $_GET["result"];
              		echo '<br>';
              		if($result !== "success") { 
              			echo '<div class="alert alert-error">';
              			echo '<strong>添加失败!</strong> ' . $result . '</div>';
              		} else { 
              			echo '<div class="alert alert-success">';
              			echo '<strong>添加成功!</strong>已成功添加</div>';
              		}
              	}
              ?>
              <div class="control-group">
                <label class="control-label">用户名</label>
                <div class="controls">
                  <input type="text" name="username">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">密码</label>
                <div class="controls">
                  <input type="text" name="passwd">
                </div>
              </div>
              <div class="control-group">
                <label class="control-label">用户类型</label>
                <div class="controls">
                  <select name="type" class="form-control">
					  <option value="admin">管理员</option>
					  <option value="qc">QC</option>
					  <option value="supervisor">督导</option>
					  <option value="inspecter">执行人员</option>
					</select>
                </div>
              </div>
              <div class="center form-actions">
                <input type="submit" value="添加" class="btn btn-large btn-success">
              </div>
            </form>
          </div>
      </div>
    </div>
    <hr/>
        
</div>
<?php
	require("footer.php");
?>